const koa = require('koa')
const route = require('koa-route')
const app = new koa()

const main = (ctx)=>{
  ctx.response.body = "Hello World"
}

const redirect = ctx =>{
  ctx.response.redirect('/')
  ctx.response.body = '<a href="/"> Index Page</a>'
}

app.use(route.get('/',main))
app.use(route.get('/redirect',redirect))


app.listen(3000)